package com.luxx.service;

import com.luxx.dao.DishDao;
import com.luxx.entity.Dish;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by luxx on 2018/1/17 0017.
 */
@Service
public class TestService {
    @Transactional
    public void test(){
        Dish dish = dishDao.findOne(1L);
        dish.setName("111111111111111111");
    }
    @Autowired
    private DishDao dishDao;
}
